package com.example.spring_mybatis.service;

import com.example.spring_mybatis.mapper.UserInfoMapper;
import com.example.spring_mybatis.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025/6/17
 * Time: 21:30
 */
@Service
public class UserService {
    private final UserInfoMapper userInfoMapper;

    @Autowired
    public UserService(UserInfoMapper userInfoMapper) {
        this.userInfoMapper = userInfoMapper;
    }

    public List<UserInfo> getUserInfoAll1() {
        return userInfoMapper.getUserInfoAll1();
    }

    public List<UserInfo> getUserInfoADemo1(Integer deleteFlag) {
        return userInfoMapper.getUserInfoSelectDemo1(deleteFlag);
    }

    public List<UserInfo> loginByUserNameOrPassword(String userName, String password) {
        return userInfoMapper.loginByUserNameOrPassword(userName,password);
    }
}
